home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Sound / LAME / WarpOS / src / frontend / rtp.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-12-19  |  1.1 KB  |  47 lines

  1. #ifndef LAME_RTP_H
  2. #define LAME_RTP_H
  3.  
  4. #include <sys/socket.h>
  5. #include <netinet/in.h>
  6.  
  7. struct rtpbits {
  8.   int sequence:16;    /* sequence number: random */
  9.   int pt:7;    /* payload type: 14 for MPEG audio */
  10.   int m:1;    /* marker: 0 */
  11.   int cc:4;    /* number of CSRC identifiers: 0 */
  12.   int x:1;    /* number of extension headers: 0 */
  13.   int p:1;    /* is there padding appended: 0 */
  14.   int v:2;    /* version: 2 */
  15. };
  16.  
  17. struct rtpheader {      /* in network byte order */
  18.   struct rtpbits b;
  19.   int timestamp;        /* start: random */
  20.   int ssrc;             /* random */
  21.   int iAudioHeader;    /* =0?! */
  22. };
  23.  
  24. void initrtp(struct rtpheader *foo);
  25. int sendrtp(int fd, struct sockaddr_in *sSockAddr, struct rtpheader *foo, const void *data, int len);
  26. int makesocket(char *szAddr,unsigned short port,unsigned char TTL,struct sockaddr_in *sSockAddr);
  27. void rtp_output(const char *mp3buffer,int mp3size);
  28.  
  29. #ifdef 0
  30. int rtp_send (
  31.     SOCKET s,
  32.     struct rtpheader *foo,
  33.     void *data,
  34.     int len
  35. ) ;
  36.  
  37. int rtp_socket (
  38.     SOCKET *ps,
  39.     char *Address,
  40.     unsigned short port,
  41.     int TTL
  42. ) ;
  43. #endif
  44.  
  45.  
  46. #endif
  47.